const fs = require("fs")

// 读取 dist/swan/app.css 文件
const filePath = "dist/swan/app.css"
const fileContent = fs.readFileSync(filePath, "utf-8")

// 将 url(//at.alicdn.com 替换为 url(https://at.alicdn.com
const modifiedContent = fileContent.replace(
  /url\(\/\/at\.alicdn\.com/g,
  "url(https://at.alicdn.com"
)

// 将修改后的内容写入文件
fs.writeFileSync(filePath, modifiedContent)

console.log("URL替换完成！")
